package com.apps.MobileSms.Aliyun.enums;

/**
 * 短信模板
 *
 * @author yuxd
 * @date 2019-04-20 15:51
 * @since v2.0
 */
public enum SmsTemplate {
    COMMON_VERIFY_SMS("会员操作通用验证", "SMS_157689015", "code"),
    REMIND_DELIVERY_SMS("提醒商家发货", "SMS_165411930", "shopname,buyname"),
    REFUND_REMIND_SMS("提醒商家处理退款申请模板", "SMS_172008601", "utype,uname,ordersn"),
    PAIDOFF_REMIND_SMS("提醒商家买家付款成功短信模板", "SMS_173247500", "shopname,username,goodsnamelist"),
    SYSTEM_ERROR_REMIND_SMS("系统运行异常时通知开发短信模板","SMS_176929542","name,msg"),
    CONCERN_CHANGE_REMIND_SMS("关注者变更通知短信模板","SMS_179215120","exConcern,fans,concern"),
    MANAGE_DATA_NOTICE_SMS("简单的经营数据统计通知","SMS_189623598","user,order,totalprice,deaynum"), // 只给老版发送

    /**重置密码，pwdname:密码类别，比如是登录密码或支付密码*/
    RESET_PWD_SMS("重置密码", "SMS_165416867", "pwdname,pwd"),

    /**修改密码，登陆密码或支付密码修改成功后的通知短信*/
    MODIFY_PWD_SMS("修改密码", "SMS_172735494", "pwdType"),

    /*** 以下所有短信模板都将取消，客户端所有验证操作都使用通用短信模板代替 ***/
    LOGINMOBILE("会员登录"),
    FINDPASSWORD("修改密码"),
    CHECKMOBILE("普通校验"),
    REGISTERMOBILE("注册云父巴巴", "SMS_67735008", "code"),
    BINDINGMOBILE("绑定手机", "SMS_67635042", "code"),
    UPDATEPASSWORDMOBILE("修改绑定手机号码,老手机号", "SMS_67625042", "code"),
    /*** 华丽分割线 ***/

    NO_3("购买充值卡发送给用户充值卡和密码", "SMS_67775004", "cardno,pwd"),
    NO_4("提现申请审核不通过", "SMS_67655027", "remarks"),
    NO_5("申请合伙人申请不通过", "SMS_67690040", "remarks"),
    NO_6("提现申请审核已通过", "SMS_67670040", ""),
    NO_7("申请合伙人已通过", "SMS_67595038", ""),
    NO_13("修改支付宝账号", "SMS_67595022", "code"),
    NO_14("提现申请已经审核通过", "SMS_67670040", ""),
    NO_16("云父巴巴网对手机号充值", "SMS_67740005", "telphone,price"),
    NO_17("您的财务密码为", "SMS_67625043", "pwd"),
    NO_22("充值成功", "SMS_67665007", "price"),
    NO_23("成为正式的合伙人", "SMS_67580050", ""),
    NO_24("系统中产品库存不足", "SMS_67560051", "pname,ProductCount"),
    NO_25("平台有新的来款", "SMS_67555020", "MarkedNum,Price"),
    NO_26("获取动态密码", "SMS_58330101", "code,product"),
    NO_27("诚信消费最后还款日前提醒", "SMS_107830051", "daysRemaining"),
    NO_28("订单发货通知", "SMS_121165764", "name,goods"),
    NO_29("用户充值话费通知", "SMS_125118243", "name,money"),
    NO_30("新增粉丝短信提醒", "SMS_136856736", "name"),
    NO_31("管理员添加服务点时通知负责人", "SMS_137670702", "code");

    /**
     * 模板描述
     */
    private String desc;

    /**
     * 模板Code
     */
    private String templateCode;

    /**
     * 模板参数
     */
    private String params;

    private SmsTemplate(String desc, String templateCode, String params) {
        this.desc = desc;
        this.params = params;
        this.templateCode = templateCode;
    }


    public String getDesc() {
        return desc;
    }

    public String getParams() {
        return params;
    }

    public String getTemplateCode() {
        return templateCode;
    }

    public static SmsTemplate getInstance(String key) {
        SmsTemplate smsTemplateEnum = null;
        try {
            smsTemplateEnum = SmsTemplate.valueOf(key);
        } catch (IllegalArgumentException ex) {

        }
        return smsTemplateEnum;
    }

    // 构造方法
    private SmsTemplate(String key) {
        this.key = key;
    }

    public String getKey() {
        return this.key;
    }

    private String key;
}
